import { babel } from '@rollup/plugin-babel';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import scss from 'rollup-plugin-scss'


let commonPlugins = [
  babel({ babelHelpers: 'bundled' } ),  scss()
]

function demoAppPlugin() {
    return {
        buildStart(){
        },
        generateBundle(options, bundle, isWrite) {
        }
    }
}

const config = [
  {
    input: 'src/lib.js',
    output: {
      dir: 'minicode/common',
      format: 'cjs',
      entryFileNames: 'lib.js',
      assetFileNames: 'lib[extname]'
    },
    plugins: [nodeResolve(), ...commonPlugins, demoAppPlugin()],
    external: []
  },
];

export default config;